package tech.edwardvan.demospringbootautoconfigure.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import tech.edwardvan.demospringbootautoconfigure.imports.DemoImportSelector;
import tech.edwardvan.demospringbootautoconfigure.properties.DemoProperties;

/**
 * 配置类
 *
 * @author EdwardVan
 */
@Configuration
@ConditionalOnProperty(name = "demo-starter.enable", havingValue = "true")
@EnableConfigurationProperties(DemoProperties.class)
@Import({DemoImportSelector.class})
public class DemoConfiguration {

    DemoProperties demoProperties;

    public DemoConfiguration(DemoProperties demoProperties) {
        this.demoProperties = demoProperties;
    }
}
